Update default config behaviour #26
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR:
Details:
Previously, when config had omitted values, the command was replacing each of them with a default value.
For example, if the
.commit.jsonfile contained only the issue regex{ "issueRegex": "ABC-[0-9]+" }the resulting config would be as follows:
{ "issueRegex": "ABC-[0-9]+", "outputIssuePrefix": "#", "outputIssueSuffix": "", "outputStringPrefix": "", "outputStringSuffix": ": ", }Note that
outputIssuePrefixandoutputStringSuffixhave default values here that were not originally specified by the user, even though they provided the.commit.jsonconfig file.While this was the default behavior I wanted at the time of initial development of the tool, after using it for a while and talking to other users, I think having these values set by default is counterintuitive. From now on, if the same content was provided in the config file, the missing properties will default to empty strings.
However, if no config file was specified, the tool will still default to the GitHub issue style with simple output formatting.